package lq2097;

//lq2097，AC
import java.util.Scanner;

public class AC {
    static int n,x;
    //前缀和数组
    static long[] arr;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        n=sc.nextInt();
        x=sc.nextInt();
        arr=new long[n+1];
        //读取同时计算前缀和
        for(int i=1;i<=n-1;i++){
            int t=sc.nextInt();
            arr[i]=arr[i-1]+t;
        }

        
        //整数二分模板
  		int l=1,r=n;
  		while(l<=r){
  			//向右位移一位相当于除以2
  			//位移效率比除以2高
  			int mid = (l+r) >> 1;
  		    if(check(mid)) 
  		    	r = mid - 1;
  		    else 
  		    	l = mid + 1;
  		}

  	    System.out.println(l);
    }
    
    //检查每个区间是否大于2x
    static boolean check(int mid){
        for(int i=1;i<=n-mid;i++){
            if(arr[i+mid-1]-arr[i-1]<2*x)
                return false;
        }
        return true;
    }
}